﻿using System;
using System.Reflection;

namespace iTool.PluginCore.Connector
{

    public class Route : Attribute
    {
        public Route(string template)
        {
            this.Template = template;
        }
        public string Template { get; }
    }

    public class Post : Attribute
    {
        public Post() { }
        public Post(string template)
        {
            this.Template = template;
        }
        public string Template { get; }
    }

    public class Get : Attribute
    {
        public Get() { }
        public Get(string template)
        {
            this.Template = template;
        }
        public string Template { get; }
    }

    public class Put : Attribute
    {
        public Put() { }
        public Put(string template)
        {
            this.Template = template;
        }
        public string Template { get; }
    }

    public class Delete : Attribute
    {
        public Delete() { }
        public Delete(string template)
        {
            this.Template = template;
        }
        public string Template { get; }
    }

    public class HttpWorkerInfo
    {
        public string MethodType { get; set; }
        public string RouteTemplate { get; set; }
        public Type WorkerType { get; set; }
        public MethodInfo Method { get; set; }
        public object Instance { get; set; }
    }
}
